package com.solcoo.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.solcoo.controller.JsonResult;
import com.solcoo.json.customer.DateTimeSerializer;

public class DingDan extends JsonResult {
	
    private int id;
    private String leixing;
    private double jine;
    private int shanghuid;
    private int gerenid;
    private String gerenName;
    private String delFlag;
    private String shQuery;
    private String grQuery;
    private String handlers;
	//实际充值金额（特指充值）
    private Double realInAmount;
	//赠送金额
    private Double freeAmount;
    private double yue;
    private String empname;
    private Date shijian;
    // 撤销人类型：1-商户、3-配送员
    private String revokeemp;

    public String getRevokeemp() {
		return revokeemp;
	}

	public void setRevokeemp(String revokeemp) {
		this.revokeemp = revokeemp;
	}

	public String getHandlers() {
		return handlers==null?"":handlers;
	}
    
	public void setHandlers(String handlers) {
		this.handlers = handlers;
	}
	
	public String getShQuery() {
		return shQuery;
	}
	public void setShQuery(String shQuery) {
		this.shQuery = shQuery;
	}
	
	public String getGrQuery() {
		return grQuery;
	}
	
	public void setGrQuery(String grQuery) {
		this.grQuery = grQuery;
	}
	
	public String getDelFlag() {
		return delFlag;
	}
	
	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
	
    @JsonSerialize(using = DateTimeSerializer.class)
    public Date getShijian() {
		return shijian;
	}
    
	public void setShijian(Date shijian) {
        this.shijian = shijian;
    }
	
    public double getYue() {
        return yue;
    }
    public void setYue(double yue) {
        this.yue = yue;
    }
    
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public String getLeixing() {
        return leixing==null?"":leixing;
    }
    
    public void setLeixing(String leixing) {
        this.leixing = leixing;
    }
    
    public double getJine() {
        return jine;
    }
    
    public void setJine(double jine) {
        this.jine = jine;
    }
    
    public int getShanghuid() {
        return shanghuid;
    }
    
    public void setShanghuid(int shanghuid) {
        this.shanghuid = shanghuid;
    }
    
    public int getGerenid() {
        return gerenid;
    }
    
    public void setGerenid(int gerenid) {
        this.gerenid = gerenid;
    }
    
    public Double getRealInAmount() {
        if(this.realInAmount == null) {
            return 0d;
        }
        return realInAmount;
    }
    
    public void setRealInAmount(Double realInAmount) {
        if(this.realInAmount == null) {
            this.realInAmount =0d;
        }
        this.realInAmount = realInAmount;
    }
    
    public Double getFreeAmount() {
        if(freeAmount == null) {
            return 0d;
        }
        return freeAmount;
    }
    
    public void setFreeAmount(Double freeAmount) {
        if(freeAmount == null) {
            this.freeAmount = 0d;
        }
        this.freeAmount = freeAmount;
    }

    public String getDate() {
        SimpleDateFormat sf = new SimpleDateFormat("MM.dd");
        return sf.format(shijian);
    }

    public String getTime() {
        SimpleDateFormat sf = new SimpleDateFormat("HH:mm");
        return sf.format(shijian);
    }
    
    public String getEmpname() {
		return empname;
	}

	public void setEmpname(String empname) {
		this.empname = empname;
	}

	public String getGerenName() {
        return gerenName;
    }
    
    public void setGerenName(String gerenName) {
        this.gerenName = gerenName;
    }

}
